

#ifndef EMPLOYEEDAO_INTERFACE_H
#define EMPLOYEEDAO_INTERFACE_H

#include <stdint.h>
#include <string>
#include "app_platform/cntl_info.h"

#include "erp/employee/ddo/employeefilterddo_employee.h"	
#include <set>	
#include <map>	
#include "erp/employee/ddo/employeeddo_employee.h"	


namespace erp
{
namespace employee
{
namespace dao
{

	/// 同步调用接口
	class IEmployeeDao	{
	public:
		virtual ~IEmployeeDao() {}

	public:

		/**
		 *
	 	 *  写入员工信息 
		 *
		 *@param String machineKey: 机器码，必填  				
		 *@param String source: 调用来源，必填  				
		 *@param uint32_t sceneId: 场景id，必填  				
		 *@param EmployeeDdo employee: 员工信息列表，必填  				
		 *@param String inReserve: 请求保留字  				
		 *@param String errmsg: 错误信息  		
		 *@param EmployeeDdo employeeBack: 员工信息列表，必填  		
		 *@param String outReserve: 返回保留字   		
		 *
		 *@return  uint32_t : 0(成功) 其它失败
 	     *
		 */
	    virtual uint32_t AddEmployee(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::employee::ddo::CEmployeeDdo& employee,
				const std::string& inReserve,
				std::string& errmsg,
				erp::employee::ddo::CEmployeeDdo& employeeBack,
				std::string& outReserve
	    	) = 0;

		/**
		 *
	 	 *  删除员工信息 
		 *
		 *@param String machineKey: 机器码，必填  				
		 *@param String source: 调用来源，必填  				
		 *@param uint32_t sceneId: 场景id，必填  				
		 *@param EmployeeDdo employee: 员工信息列表，必填  				
		 *@param String inReserve: 请求保留字  				
		 *@param String errmsg: 错误信息  		
		 *@param String outReserve: 返回保留字   		
		 *
		 *@return  uint32_t : 0(成功) 其它失败
 	     *
		 */
	    virtual uint32_t DeleteEmployee(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::employee::ddo::CEmployeeDdo& employee,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	    	) = 0;

		/**
		 *
	 	 *  根据ID获取员工信息 
		 *
		 *@param String machineKey: 机器码，必填  				
		 *@param String source: 调用来源，必填  				
		 *@param uint32_t sceneId: 场景id，必填  				
		 *@param EmployeeFilterDdo employeeFilter: 过滤器，必填  				
		 *@param String inReserve: 请求保留字  				
		 *@param String errmsg: 错误信息  		
		 *@param Map employees: 员工信息  		
		 *@param String outReserve: 返回保留字   		
		 *
		 *@return  uint32_t : 0(成功) 其它失败
 	     *
		 */
	    virtual uint32_t GetEmployeeById(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::employee::ddo::CEmployeeFilterDdo& employeeFilter,
				const std::string& inReserve,
				std::string& errmsg,
				std::map<uint32_t,erp::employee::ddo::CEmployeeDdo >& employees,
				std::string& outReserve
	    	) = 0;

		/**
		 *
	 	 *  修改员工信息 
		 *
		 *@param String machineKey: 机器码，必填  				
		 *@param String source: 调用来源，必填  				
		 *@param uint32_t sceneId: 场景id，必填  				
		 *@param EmployeeDdo employee: 员工信息列表，必填  				
		 *@param String inReserve: 请求保留字  				
		 *@param String errmsg: 错误信息  		
		 *@param EmployeeDdo employeeBack: 员工信息列表，必填  		
		 *@param String outReserve: 返回保留字   		
		 *
		 *@return  uint32_t : 0(成功) 其它失败
 	     *
		 */
	    virtual uint32_t UpdateEmployee(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::employee::ddo::CEmployeeDdo& employee,
				const std::string& inReserve,
				std::string& errmsg,
				erp::employee::ddo::CEmployeeDdo& employeeBack,
				std::string& outReserve
	    	) = 0;
	};

	///异步调用接口
	class IEmployeeDaoAsyc
	{
	public:
		virtual ~IEmployeeDaoAsyc() {}
	public:
		virtual uint32_t SendAddEmployee(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::employee::ddo::CEmployeeDdo& employee,
				const std::string& inReserve
				) = 0;
		virtual uint32_t RecvAddEmployee(
				const CCntlInfo& rCntlInfo,

				std::string& errmsg,
				erp::employee::ddo::CEmployeeDdo& employeeBack,
				std::string& outReserve
				) = 0;
		virtual uint32_t SendDeleteEmployee(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::employee::ddo::CEmployeeDdo& employee,
				const std::string& inReserve
				) = 0;
		virtual uint32_t RecvDeleteEmployee(
				const CCntlInfo& rCntlInfo,

				std::string& errmsg,
				std::string& outReserve
				) = 0;
		virtual uint32_t SendGetEmployeeById(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::employee::ddo::CEmployeeFilterDdo& employeeFilter,
				const std::string& inReserve
				) = 0;
		virtual uint32_t RecvGetEmployeeById(
				const CCntlInfo& rCntlInfo,

				std::string& errmsg,
				std::map<uint32_t,erp::employee::ddo::CEmployeeDdo >& employees,
				std::string& outReserve
				) = 0;
		virtual uint32_t SendUpdateEmployee(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const erp::employee::ddo::CEmployeeDdo& employee,
				const std::string& inReserve
				) = 0;
		virtual uint32_t RecvUpdateEmployee(
				const CCntlInfo& rCntlInfo,

				std::string& errmsg,
				erp::employee::ddo::CEmployeeDdo& employeeBack,
				std::string& outReserve
				) = 0;
	};
	
	
}
}
}

#endif /*EMPLOYEEDAO_INTERFACE_H*/
